//
//  SkipListSet.h
//  CollectionTest
//
//  Created by Dusan Vujosevic on 2013-10-27.
//  Copyright (c) 2013 Suavetech. All rights reserved.
//

#ifndef __CollectionTest__SkipListSet__
#define __CollectionTest__SkipListSet__

#include "CollectionBase.h"
#include "STSkipListSet.h"

typedef st::STSkipListSet<elemType> mySkipList;
typedef st::STSkipListSetIterator<elemType> mySkipListIterator;

class SkipList: public CollectionBase
{
public:
	SkipList(size_t elemCountHint);
	
	virtual const char* name() const { return "STSkipList"; }
	
	// Initialization, optional
	virtual bool init();
	
	// Reset, return to intial (clean) state, mandatory
	virtual void reset();

	// Load the collection, mandatory, timed
	virtual void loadElements(const void* randBytes, size_t randBytesSize);
	
	// Random search, mandatory, timed
	virtual bool findElement(elemType elem);
	
	// Ordered iteration, optional, timed
	virtual bool canIterateOrdered() const { return true; }
	virtual void resetIterateOrdered();
	virtual bool nextIterateOrdered(elemType* elem);
	
	// Print stats
	virtual void printStats() const;
	
private:
	mySkipList _set;
	mySkipListIterator _setIterator;
};

#endif /* defined(__CollectionTest__SkipListSet__) */
